<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>put请求测试</title>
		<script src="../js/axios.js"></script>
	</head>
	<body>
		<script>
		/*需求：name=阿富汗的信息改为name:'女当家',age:'15',sex:'女'
		
		如果有多个参数并且重复时，如何封装？
		
		解决方案：restFul+对象组合方案处理
		*/
		let name='阿富汗'
	   
		let url = `http://localhost:8090/axios/updateUserByName/${name}`
		
		let user ={
			name:'女当家',
			age:'15',
			sex:'女'
		}
		
		axios.put(url,user).then(resu=>{
			console.log(resu.data)
		})
		</script>
	</body>
</html>
